<center><img src="prestador.png"/></center><br /><br />
<fieldset style="line-height: 230%;">
    <form action="cadastro_prestador.php" method="POST">
        <b>Placa:</b>
        <input id="placa" type="text" name="placa" size="10" maxlength="8" onKeyUp="separador(this)" style="text-transform:uppercase;" />
        <input type="button" id="busca"  value="Busca Placa" onclick="busca_placa()" /> <br />

        <div name="div_operacao" id="div_operacao" style="visibility:hidden">
            <b id="motorista_">Motorista:</b>
            <input id="motorista" type="text" name="motorista" size="30" style="text-transform:uppercase;"/><br />
            <b id="cracha_">Cracha:</b>
            <input id="cracha" type="text" name="cracha" size="10" onkeypress='return somentenumero(event)'/><br />
            <b id="capacete_">Capacete:</b>
            <input id="capacete" type="text" name="capacete" size="10" onkeypress='return somentenumero(event)'/><br />
            <b id="operacao_">Operação:</b>
            <select id="select_operacao" name="select_operacao" style="min-width: 150px"> <br />
                <?php
                $sql = "SELECT operacao FROM operacao WHERE bloqueado = 0 ORDER BY operacao";
                $query = mysql_query($sql);
                echo "<option value = 'vazio' > Selecione... </option>";
                while ($dados = mysql_fetch_array($query)) {
                    echo "<option id=" . $dados['operacao'] . " value = " . $dados['operacao'] . ">" . $dados['operacao'] . "</option>";
                }
                ?>        
            </select>
            <br />
            <b id="destino_">Destino:</b>
            <input id="destino" type="text" name="destino" size="20" style="text-transform:uppercase;"/><br />
            <input type="submit" id="salvar" value="Entrada" />
            <input type="button" value="Limpar" onclick="javascript:window.history.go(0)"/>
        </div>
    </form>
</fieldset>
<fieldset style="height: 200px">
    <legend style="font-size: 20px; background: #D3D3D3; color: #696969">Fila</legend>
    <div name="fila" id="fila" style="width: 50%; height: 20px; margin-top: 25px;">
        <form action="cadastro_fila.php" method="POST">
            <b>Placa:</b>
            <input id="placa_fila" type="text" name="placa_fila" size="10" maxlength="8" onKeyUp="separador(this)" style="text-transform:uppercase;" />
            <input type="submit" id="adicionar" value="Adicionar" />
        </form>

    </div>
    <div style="width: 50%; height: -10%; margin-top: -5%; float:right">
        <div id="placa" style="width: 80px; float:left; text-align: center; margin-left: 33px">Placa</div>
        <div id="dt_ent" style="width: 60px; float:left; text-align: center">Data</div>
        <div id="hr_ent" style="width: 50px; float:left; text-align: center">Hora</div>
        <div id="hr_ent" style="width: 40px; float:left; text-align: center">#</div>
    </div>
    <?php
    $query = "SELECT * FROM fila";
    $result = mysql_query($query);
    $cont = 1;
    echo '<div style="width: 46%; height: 40%; margin-top: -3%; float:right; text-align: left; overflow: scroll; overflow-x: hidden">';
    echo "<table>";
    while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
        if ($cont % 2 == 0) {
            echo "<tr style='background: #D3D3D3'>";
        } else {
            echo "<tr>";
        }
        echo '<td>' . $row["placa"] . '</td>
                    <td>' . $row["data"] . '</td>
                    <td>' . $row["hora"] . '</td>
                    <td style="width:40px; text-align: center">' . $cont . '</td>
            </tr>';

        $cont++;
    }
    echo "</table></div>";
    ?>

</fieldset>


